package cn.zhangxin.pethome.system.menu.domain;


//import java.util.ArrayList;
//import java.util.List;
//import cn.zhangxin.pethome.base.domain.BaseDomain;
//import com.fasterxml.jackson.annotation.JsonInclude;
//import lombok.Data;
import cn.zhangxin.pethome.base.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author zx
 * @since 2023-02-01
 */
@Data
public class Menu extends BaseDomain{

    private static final long serialVersionUID = 1L;

    private String name;
    private String component;
    private String url;
    private String icon;
    private Integer index;
    private Long parentId;
    private String intro;
    private Integer state;
    //父级菜单名称
    private String parentname;

    //存放菜单树
    /*@JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Menu> children = new ArrayList<>();*/
    @JsonInclude(JsonInclude.Include.NON_EMPTY)// 解决空集合
    private List<Menu> children = new ArrayList<>();

    public List<Menu> getChildren() {
        //return children;
        return this.children;
    }

    public void setChildren(List<Menu> children) {
        this.children = children;
    }
}
